/*
 * error.h
 *
 *  Created on: Feb 9, 2011
 *      Author: thienlong
 */

#ifndef AL_ERROR_H_
#define AL_ERROR_H_
#include <stdio.h>
#include <errno.h>


#define AL_StsNullPtr -1
#define AL_StsOutOfRange -2
#define AL_StsNotSupport -3
#define AL_Error(code, msg) {fprintf(stderr, msg); exit(1);}
#define SEGFAULT() do { fprintf(stderr, "%s.%d: aborted\n", __FILE__, __LINE__); abort(); } while(0)
#endif /* ERROR_H_ */
